perm filename SLANT.MF[FIG,DEK]1 blob sn#767432 filedate 1984-09-02 generic text, type T, neo UTF8
% the driver program should set
%	n = number of characters
%	s = slant ratio
%	r# = rule thickness (points)
%	u = vertical unit (pixels)
% and fontsetup should already be done (so that hppp etc are known).

if displaying>0: openit; fi

fontfamily "SLANT";
codingscheme "GFSLANT";
fontfacebyte 100s;	% temporary patch for Xerox software only
designsize:=16;

fontdimen 1: s, 0, 0, 0, 0, 0, 0, r#;

charht:=n*u/vppp; % vertical height of characters
pen p; p=pencircle xscaled(r#*hppp+blacker) yscaled(r#*vppp+blacker);
penwd=2xpart penoffset(0,1)of p; penht=ypart penoffset(-1,0)of p;
slant=(hppp/vppp)*s;

%tracingall;
for k = 1 step 1 until n:

charcode:=k;

clearit;
draw (0,0)..(k*u*slant,k*u) withpen p;
unfill (-penwd,0)..(-penwd,-penht)&(-penwd,-penht)..(penwd,-penht)&
	(penwd,-penht)..(penwd,0)&(penwd,0)..(-penwd,0)&cycle;
unfill((penwd,0)..(penwd,penht)&(penwd,penht)..(-penwd,penht)&
	(-penwd,penht)..(-penwd,0)&(-penwd,0)..(penwd,0)&cycle)
	shifted (k*u*slant,k*u);

charwd:=k*u*s/vppp;	% which is k*u*slant/hppp
shipit;
showit;

endfor;